<%@ page language="java" import="java.util.*" import="java.sql.*" import = "orm.*"  pageEncoding="utf-8" errorPage="errorPage.jsp"%>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %>
<%@ taglib uri="http://struts.apache.org/tags-tiles" prefix="tiles" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<% 	User tea  =(User) session.getAttribute("Teacher");  
	if (tea == null){
		response.sendRedirect(path + "/index.jsp");
	}
	System.out.println("chart testid:"+request.getParameter("testId"));
%><head>
<base href = "<%=basePath %>"/>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Welcome-Online Test</title>
<link href="css/tStyles.css" rel="stylesheet" type="text/css" />
<style type="text/css">
  #mymain{
	background-image: url(images/mybg.png);
	margin:auto;
	background-repeat:repeat;
	/*height: 675px;*/
	width: 1025px;
	position:absolute;
	left: 130px;
	font-family: "华文新魏";
	font-size: 30px;
	color: #000000;
	z-index: -1000;
  }
  
  #myfooter {
/*	background-image: url(images/footer.png);
	background-repeat: no-repeat;
	height: 52px;
	position:absolute;
	width: 1024px;
	top: 864px;
	left: 160px;
	overflow: visible;
	z-index: 900;*/
}
</style>

<script language="javascript" src="js/AjaxRequest.js"></script>
<script language="javascript">
    function load()
    {
       document.getElementById("mytable").src="teacher/scoreTable.jsp?testId="+<%=request.getParameter("testId")%>;
       document.getElementById("mytable2").src="teacher/scoreTable2.jsp";
    }
    
</script>
   
</head>
 
<body onload="load()">
	<!-- CONTAINER START -->
	<div id = "container">
		<!-- HEADER START -->
        <div id = "top">
        	<div id = "navigation">
            	<html:link page="/teacher/teacher.jsp" styleClass = "link">&nbsp;&nbsp;&nbsp;&nbsp;首页</html:link>
                <html:link page="/teacher/notice.jsp" styleClass = "link">&nbsp;&nbsp;&nbsp;&nbsp;通知</html:link>
                <html:link action="manageQuestions.do?action=startManagement" styleClass = "link">&nbsp;&nbsp;&nbsp;&nbsp;题库</html:link>
                <html:link action="manageKnowledges.do?action=startManagement" styleClass = "link">&nbsp;&nbsp;&nbsp;&nbsp;知识点</html:link>
                <html:link action="manageTemplates.do?action=startManagement" styleClass = "link">&nbsp;&nbsp;&nbsp;&nbsp;试卷模板</html:link>
                <html:link action="gradeManagement.do?action=startMana" styleClass = "link">&nbsp;&nbsp;&nbsp;&nbsp;成绩管理</html:link>
                <html:link page="/teacher/studentMana.jsp" styleClass = "link">&nbsp;&nbsp;&nbsp;&nbsp;学生管理</html:link>
            </div>
        </div>
        <!-- HEADER END -->
        <div id="mymain">
        	<br />
        	<br />
           <div align="center">
             <iframe  src="" height="200" width="500" frameborder="0"
            		marginheight="0" marginwidth="0" id="mytable" name="stuScoreTable"></iframe>
             <iframe src="" height="200" width="500" frameborder="0" 
                    marginheight="0" marginwidth="0" id="mytable2" name="stuScoreTable2" ></iframe>  
           </div>
           <table align="center" >
             <tr>
             <td>
              <img src="gradeManagement.do?action=pieAnalyse&width=450&height=330&testId="+<%=new Long(request.getParameter("testId"))%> border="1"></img>
              </td>
              <td>
               <img src="gradeManagement.do?action=histogram&width=450&height=330&testId="+<%=new Long(request.getParameter("testId"))%>" border="1"></img>
              </td>
              </tr>
           </table>
        </div>

	<!-- FOOTER START -->
	<div id = "myfooter">
  </div>
	<!-- FOOTER END -->
        
</div>
    <!-- CONTAINER END -->
    
</body>
</html>
